/*    */ package com.zimbra.cs.imap;
/*    */ 
/*    */ import com.zimbra.common.localconfig.KnownKey;
/*    */ import com.zimbra.common.localconfig.LC;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class CreateCommand
/*    */   extends ImapCommand
/*    */ {
/*    */   private ImapPath path;
/* 25 */   private int repeats = 0;
/*    */   
/*    */   public CreateCommand(ImapPath path)
/*    */   {
/* 29 */     this.path = path;
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */   protected boolean throttle(ImapCommand previousCommand)
/*    */   {
/* 36 */     if ((previousCommand instanceof CreateCommand)) {
/* 37 */       this.repeats = (((CreateCommand)previousCommand).repeats + 1);
/* 38 */       return this.repeats > LC.imap_throttle_command_limit.intValue();
/*    */     }
/* 40 */     this.repeats += 1;
/* 41 */     return false;
/*    */   }
/*    */   
/*    */ 
/*    */   public int hashCode()
/*    */   {
/* 47 */     int prime = 31;
/* 48 */     int result = 1;
/* 49 */     result = 31 * result + (this.path == null ? 0 : this.path.hashCode());
/* 50 */     return result;
/*    */   }
/*    */   
/*    */   public boolean equals(Object obj)
/*    */   {
/* 55 */     if (this == obj) {
/* 56 */       return true;
/*    */     }
/* 58 */     if (obj == null) {
/* 59 */       return false;
/*    */     }
/* 61 */     if (getClass() != obj.getClass()) {
/* 62 */       return false;
/*    */     }
/* 64 */     CreateCommand other = (CreateCommand)obj;
/* 65 */     if (this.path == null) {
/* 66 */       if (other.path != null) {
/* 67 */         return false;
/*    */       }
/* 69 */     } else if (!this.path.equals(other.path)) {
/* 70 */       return false;
/*    */     }
/* 72 */     return true;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/imap/CreateCommand.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */